import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

let defaultCity="杭州";
defaultCity=localStorage.city;

const state={
    city:"杭州"
}

const mutations={
    move(state,cityName){
        state.city=cityName;
        //写一个默认的数据
        localStorage.city="杭州"
    }
}

export default new Vuex.Store({
    state
})